1. Field of the Invention
The invention relates generally to a sine/cosine value generation apparatus, and more particularly, to a low-cost sine/cosine value generation apparatus utilizing less memory space.
2. Description of the Related Art
In a variety of engineering fields, mathematic calculations are highly required. Among complex mathematic calculations, trigonometric functions are relatively basic but important. Also, for trigonometric functions, sine/cosine functions are the most commonly used functions since a lot of engineering calculations require them as a basis for further calculations. For example, for the communication engineering field, a sine/cosine waveform(s) is often produced for subsequent signal processing.
According to mathematic definition, a circle is defined as having four quadrants, each with 90 degrees. For conventional sine/cosine generation mechanisms, all of the sine/cosine values in the first quadrant (0 to 90 degrees) are calculated and stored beforehand so that a sine/cosine value of an arbitrary angle ranging from 0 to 360 degrees can be directly obtained; sometimes with a change in sign. For example, FIG. 1 depicts a characteristic diagram for sine and cosine functions. In FIG. 1, it is shown that all of the sine values in the first and second quadrants are positive, whereas all of the cosine values in the first and fourth quadrants are positive. Based on this, if a sine value of an arbitrary angle is to be determined, say 210 degrees, for example, then the angle needs to be mapped into a corresponding angle within the first quadrant for further determination of the sine value. More specifically, through the formula: “sin(π+θ)=sin π cos θ+cos π sin θ”, the angle “210 degrees” can be mapped into “30 degrees” within the first quadrant, but with a sign change in the sine value. Therefore, the final result of “sin (210°)” will be “−sin (30°)”. In this manner, only the sine/cosine values within the first quadrant needs to be calculated beforehand, then a sine/cosine value of an arbitrary angle can be directly obtained using angle mapping.
With the sine/cosine values in the first quadrant calculated and stored beforehand, a certain amount of memory space is required, thus limiting memory cost decrease. Therefore, a low-cost sine/cosine value generation apparatus utilizing less memory space is required.